package com.yinhai.ta404.component.org.sysmg.resource.mapper.read;

import com.yinhai.ta404.component.org.sysmg.resource.entity.TaResourceParam;
import com.yinhai.ta404.component.org.sysmg.resource.entity.TaResourcePo;
import com.yinhai.ta404.core.security.vo.BaseResourceVo;
import com.yinhai.ta404.module.mybatis.mapper.Ta404SupportMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Set;


public interface ResourceOverlayReadMapper extends Ta404SupportMapper {

    TaResourcePo get(String resourceId);


    List<TaResourcePo> queryChild(String resourceId);


    List<TaResourcePo> queryByIds(@Param("resourceIdList") List<String> resourceIdList);


    Integer queryNextLevelMaxOrderNo(String resourceId);


    List<TaResourcePo> queryByCondition(TaResourceParam taResourceParam);


    List<TaResourcePo> queryNextLevelChild(String resourceId);


    List<TaResourcePo> queryNextLevelChildWithSelf(String resourceId);



    List<TaResourcePo> queryAll();


    List<TaResourcePo> queryByEffective(String effective);


    List<TaResourcePo> queryByResourceType(String resourceType);


    List<TaResourcePo> queryByUrl(String url);



    List<TaResourcePo> queryBySecurityPolicy(@Param("securityPolicy") String securityPolicy, @Param("effective") String effective);


    List<TaResourcePo> queryAllBySysCode(String sysCode);


    Long queryBySysId(String sysId);





    List<TaResourcePo> queryWitRoleId(@Param("roleId") String roleId, @Param("usePermission") String usePermission);


    List<TaResourcePo> queryEffectiveWithRoleId(@Param("roleId") String roleId, @Param("usePermission") String usePermission, @Param("effective") String effective, @Param("curDate") Date curDate);


    List<TaResourcePo> queryEffectiveWithRoleIds(@Param("list") List<String> roleIds, @Param("usePermission") String usePermission, @Param("effective") String effective, @Param("curDate") Date curDate);


    List<TaResourcePo> queryByUserId(@Param("userId") String userId, @Param("effective") String effective, @Param("usePermission") String usePermission, @Param("curDate") Date date);

    Set<String> queryUrlWithResourceIds(@Param("resourceIds") Set<String> resourceIds);


    Set<String> queryChildBtnResourceId(@Param("resourceId") String resourceId, @Param("btnType") String btnType);


    List<TaResourcePo> queryByUserIdWithField01(@Param("userId") String userId, @Param("effective") String effective, @Param("usePermission") String usePermission, @Param("curDate") Date date, @Param("field01") String field01);


    List<TaResourcePo> queryBtn(String field01);

}
